﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace Itop.YHPC
{
    public partial class DeleteImages : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string strNodes = Request["Nodes"];
            string[] nodes = strNodes.Split(',');

            try
            {
                foreach (string node in nodes)
                {
                    string strPath = Server.MapPath("Upload\\") + node;

                    if (File.Exists(strPath))
                    {
                        File.Delete(strPath);
                    }
                }

                Response.Write("{success:true}");
            }
            catch
            {
                Response.Write("{success:false}");
            }
        }
    }
}
